Training neural networks using a prioritized experience memory

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for training a neural network used to select actions performed by a reinforcement learning agent interacting with an environment. In one aspect, a method includes maintaining a replay memory, where the replay memory stores pieces of experience data generated as a result of the reinforcement learning agent interacting with the environment. Each piece of experience data is associated with a respective expected learning progress measure that is a measure of an expected amount of progress made in the training of the neural network if the neural network is trained on the piece of experience data. The method further includes selecting a piece of experience data from the replay memory by prioritizing for selection pieces of experience data having relatively higher expected learning progress measures and training the neural network on the selected piece of experience data.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims priority to U.S. patentapplication Ser. No. 15/349,894, entitled “TRAINING NEURAL NETWORKSUSING A PRIORITIZED EXPERIENCE MEMORY,” filed Nov. 11, 2016, whichclaims the benefit under 35 U.S.C. § 119(e) of U.S. Patent ApplicationNo. 62/254,610, entitled “TRAINING NEURAL NETWORKS USING A PRIORITIZEDEXPERIENCE MEMORY,” filed Nov. 12, 2015. The disclosures of theforegoing applications are incorporated herein by reference in theirentirety for all purposes.

BACKGROUND

This specification relates to reinforcement learning.

In a reinforcement learning system, an agent interacts with anenvironment by performing actions that are selected by the reinforcementlearning system in response to receiving observations that characterizethe current state of the environment.

Some reinforcement learning systems select the action to be performed bythe agent in response to receiving a given observation in accordancewith an output of a neural network.

Neural networks are machine learning models that employ one or morelayers of nonlinear units to predict an output for a received input.Some neural networks are deep neural networks that include one or morehidden layers in addition to an output layer. The output of each hiddenlayer is used as input to the next layer in the network, i.e., the nexthidden layer or the output layer. Each layer of the network generates anoutput from a received input in accordance with current values of arespective set of parameters.

SUMMARY

In general, one innovative aspect of the subject matter described inthis specification can be embodied in methods for training a neuralnetwork used to select actions performed by a reinforcement learningagent interacting with an environment by performing actions that causethe environment to transition states, where the methods include theactions of maintaining a replay memory storing pieces of experience datagenerated as a result of the reinforcement learning agent interactingwith the environment, wherein the pieces of experience data each have arespective expected learning progress measure that is a measure of anexpected amount of progress made in the training of the neural networkif the neural network is trained on the piece of experience data;selecting a piece of experience data from the replay memory byprioritizing for selection pieces of experience data having relativelyhigher expected learning progress measures; and training the neuralnetwork on the selected piece of experience data.

Other embodiments of this aspect include corresponding computer systems,apparatus, and computer programs recorded on one or more computerstorage devices, each configured to perform the actions of the methods.A system of one or more computers can be configured to performparticular operations or actions by virtue of software, firmware,hardware, or any combination thereof installed on the system that inoperation may cause the system to perform the actions. One or morecomputer programs can be configured to perform particular operations oractions by virtue of including instructions that, when executed by dataprocessing apparatus, cause the apparatus to perform the actions.

Implementations can include one or more of the following features. Insome implementations, selecting the piece of experience data includes:(i) determining a respective probability for each piece of experiencedata such that pieces of experience data having higher expected learningprogress measures have higher probabilities than pieces of experiencedata having relatively lower expected learning progress measures; and(ii) sampling a piece of experience data in accordance with thedetermined probabilities.

In some implementations, the probability PQ) for a piece of experiencedata i satisfies:

${P(i)} = \frac{p_{i}^{\alpha}}{\sum\limits_{k}\; p_{k}^{\alpha}}$

where α is a predetermined constant, k ranges across the pieces ofexperience data in the replay memory, and p_(i) is a priority for thepiece of experience data i derived from the expected learning progressmeasure for the piece of experience data i.

In some implementations, the priority is the expected learning measureplus a constant value. In some implementations, the priority is afraction having a predetermined positive value as a numerator and a rankof the piece of experience data i in a ranking of the pieces ofexperience data in the replay memory according to their expectedlearning progress measures as a denominator. In some implementations,the priority is set to a maximum value for a piece of experience datathat has not yet been used in training.

In some implementations, each piece of experience data is an experiencetuple that includes a respective current observation characterizing arespective current state of the environment, a respective current actionperformed by the agent in response to the current observation, arespective next state characterizing a respective next state of theenvironment, and a reward received in response to the agent performingthe current action.

In some implementations, training the neural network on the selectedpiece of experience data includes determining a temporal differencelearning error for the selected experience tuple and using the temporaldifference learning error in adjusting values of the parameters of theneural network.

In some implementations, using the temporal difference learning error inadjusting the values of the parameters includes determining a weight forthe temporal difference learning error using the expected learningprogress measure for the selected experience tuple; adjusting thetemporal difference learning error using the weight; and using theadjusted temporal difference learning error as a target error foradjusting the values of the parameters of the neural network.

In some implementations, the methods further include annealing anexponent used in computing the weight during the training of the neuralnetwork.

In some implementations, the expected learning progress measure for eachexperience tuple in the replay memory is an absolute value of a temporaldifference learning error determined for the experience tuple thepreceding time the experience tuple was used in training the neuralnetwork.

In some implementations, the expected learning progress measure for eachexperience tuple in the replay memory is a derivative of an absolutevalue of a temporal difference learning error determined for theexperience tuple the preceding time the experience tuple was used intraining the neural network.

In some implementations, the expected learning progress measure for eachexperience tuple in the replay memory is a norm of an inducedweight-change by using the experience tuple to train the neural network.

In some implementations, the methods further include determining when todelete pieces of experience data from the replay memory using theexpected learning progress measures.

The subject matter described in this specification can be implemented inparticular embodiments so as to realize one or more of the followingadvantages. Training data from a replay memory can be selected in a waythat increases the value of the selected data for training a neuralnetwork. This can, in turn, increase the speed of training of neuralnetworks used in selecting actions to be performed by agents and reducethe amount of training data needed to effectively train those neuralnetworks. Thus, the amount of computing resources necessary for thetraining of the neural networks can be reduced. For example, the amountof memory required for storing the training data can be reduced, theamount of processing resources used by the training process can bereduced, or both. The increased speed of training of neural networks canbe especially significant for complex neural networks that are harder totrain or for training neural networks to select actions to be performedby agents performing complex reinforcement learning tasks.

The details of one or more embodiments of the subject matter of thisspecification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example reinforcement learning system.

FIG. 2 is a flow chart an example process for training a neural networkusing a replay memory.

FIG. 3 is a flow chart of an example process for sampling experiencedata based on determined probabilities of experience data.

FIG. 4 is a flow chart of an example process for training a neuralnetwork on an experience tuple.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

This specification generally describes a reinforcement learning systemthat selects actions to be performed by a reinforcement learning agentinteracting with an environment. In order for the agent to interact withthe environment, the system receives data characterizing the currentstate of the environment and selects an action from a predetermined setof actions to be performed by the agent in response to the receiveddata. Data characterizing a state of the environment will be referred toin this specification as an observation.

In some implementations, the environment is a simulated environment andthe agent is implemented as one or more computer programs interactingwith the simulated environment. For example, the simulated environmentmay be a video game and the agent may be a simulated user playing thevideo game. As another example, the simulated environment may be amotion simulation environment, e.g., a driving simulation or a flightsimulation, and the agent is a simulated vehicle navigating through themotion simulation. In these implementations, the actions may be controlinputs to control the simulated user or simulated vehicle.

In some other implementations, the environment is a real-worldenvironment and the agent is a mechanical agent interacting with thereal-world environment. For example, the agent may be a robotinteracting with the environment to accomplish a specific task. Asanother example, the agent may be an autonomous or semi-autonomousvehicle navigating through the environment. In these implementations,the actions may be control inputs to control the robot or the autonomousvehicle.

FIG. 1 shows an example reinforcement learning system 100. Thereinforcement learning system 100 is an example of a system implementedas computer programs on one or more computers in one or more locations,in which the systems, components, and techniques described below areimplemented.

The reinforcement learning system 100 selects actions to be performed bya reinforcement learning agent 102 interacting with an environment 104.That is, the reinforcement learning system 100 receives observations,with each observation characterizing a respective state of theenvironment 104, and, in response to each observation, selects an actionfrom a predetermined set of actions to be performed by the reinforcementlearning agent 102 in response to the observation. In response to someor all of the actions performed by the agent 102, the reinforcementlearning system 100 receives a reward. Each reward is a numeric valuereceived from the environment 104 as a consequence of the agentperforming an action, i.e., the reward will be different depending onthe state that the environment 104 transitions into as a result of theagent 102 performing the action. In particular, the reinforcementlearning system 100 selects actions to be performed by the agent 102using an action selection neural network 110 and a training engine 120.

The action selection neural network 110 is a neural network thatreceives as an input an observation about the state of the environment104 and generates as an output a respective Q value for each action,i.e., a prediction of expected return resulting from the agent 102performing the action in response to the observation.

To allow the agent 102 to effectively interact with the environment 104,the reinforcement learning system 100 includes a training engine 120that trains the action selection neural network 110 to determine trainedvalues of the parameters of the action selection neural network 110.

To assist in the training of the action selection neural network, thetraining engine 120 maintains a replay memory 130.

The replay memory 130 stores pieces of experience data generated as aconsequence of the interaction of the agent 102 or another agent withthe environment 104 or with another instance of the environment for usein training the action selection network 110.

The training engine 120 trains the action selection neural network 110by repeatedly selecting pieces of experience data from the replay memory130 and training the action selection neural network 110 on the selectedpieces of experience data. Training the action selection neural network110 using the experience data in the replay memory 130 is described inmore detail below with reference to FIGS. 2 and 3.

FIG. 2 is a flow chart of an example process 200 for training a neuralnetwork using a replay memory. For convenience, the process 200 will bedescribed as being performed by a system of one or more computerslocated in one or more locations. For example, a reinforcing learningsystem, e.g., the reinforcing learning system 100 of FIG. 1,appropriately programmed in accordance with this specification, canperform the process 200.

The system maintains a replay memory (202). The replay memory storespieces of experience data generated as a result of the agent interactingwith the environment. Each piece of experience data representsinformation about an interaction of the agent with the environment.

In some implementations, each piece of experience data is an experiencetuple that includes: (1) a current observation characterizing thecurrent state of the environment at one time; (2) a current actionperformed by the agent in response to the current observation; (3) anext observation characterizing the next state of the environment afterthe agent performs the current action, i.e., a state that theenvironment transitioned into as a result of the agent performing thecurrent action; and (4) a reward received in response to the agentperforming the current action.

The system also maintains (in the replay memory or in a separate storagecomponent) an expected learning progress measure for some or all of thepieces of experience data. An expected learning progress measureassociated with a piece of experience data is a measure of the expectedamount of progress made in the training of the neural network if theneural network is trained using the piece of experience data. In otherwords, the expected learning progress measure is an indication of howmuch a neural network can expect to learn from a piece of experiencedata.

In some implementations, the system determines an expected learningprogress measure associated with an experience tuple based on apreviously calculated temporal difference error for the experiencetuple, i.e., the temporal difference error from the preceding time theexperience tuple was used in training the neural network. Determining atemporal difference error for an experience tuple is described in moredetail below with reference to FIG. 3.

In some implementations, the expected learning progress measure is anabsolute value of the temporal difference learning error determined forthe experience tuple the preceding time the experience tuple was used intraining the neural network. In some implementations, the expectedlearning progress measure is derivative of an absolute value of atemporal difference learning error determined for the experience tuplethe preceding time the experience tuple was used in training the neuralnetwork.

In some implementations, the expected learning progress measureassociated with an experience tuple is an adjusted measure of theabsolute value of a previously calculated temporal difference learningerror for the experience tuple. The adjustment of temporal differenceerrors is configured so that for two experience tuples whose absolutevalue of previously-calculated temporal difference learning error areequal, the tuple whose temporal difference learning error has a positivevalue will have a higher expected learning progress measure.

In some implementations, the expected learning progress measure for eachexperience tuple in the replay memory is a norm of an inducedweight-change resulting from using the experience tuple to train theneural network.

The system selects a piece of experience data from the replay memory(204). In selecting the piece of experience data, the system prioritizesthe selection of pieces of experience data having relatively higherexpected learning progress measures relative to other pieces ofexperience data in the replay memory.

In some implementations, the system determines a respective probabilityfor each piece of experience data using the expected learning progressmeasures and samples a piece of experience data in accordance with thedetermined probabilities. Sampling experience data in accordance withdetermined probabilities is described in more detail below withreference to FIG. 3.

The system trains the neural network on the selected piece of experiencedata (206). In some implementations, the system uses the selected pieceof experience data to adjust the values of the parameters of the neuralnetwork. Training neural networks on experience data is described infurther detail below with reference to FIG. 4.

In some implementations, during the training of the neural network, thesystem determines when to delete pieces of experience data from thereplay memory using the expected learning progress measures.

In some of these implementations, the system determines to delete apiece of experience data when the respective expected learning measureassociated with the piece of experience data falls below a thresholdvalue. The threshold value may be a predetermined constant value or afunction of a measure of central tendency, e.g., a mean or a median, ofthe expected learning measures of pieces of experience data in thememory replay.

In others of these implementations, the system determines to delete apiece of experience data when a value derived at least in part from theexpected learning progress measure of the experience data (e.g., aprobability or priority for the piece of experience data) falls below athreshold value.

FIG. 3 is a flow chart of an example process 300 for sampling experiencedata based on determined probabilities of experience data. Forconvenience, the process 300 will be described as being performed by asystem of one or more computers located in one or more locations. Forexample, a reinforcing learning system, e.g., the reinforcing learningsystem 100 of FIG. 1, appropriately programmed in accordance with thisspecification, can perform the process 300.

The system determines a respective priority for each piece of experiencedata (302). In particular, the system determines the priority for eachpiece of experience data based on the expected learning measure of thepiece of experience data.

In some implementations, the priority for a piece of experience data isthe expected learning measure of the piece of experience data plus aconstant value.

In some other implementations, the priority for a piece of experiencedata is a fraction having a predetermined positive value as a numeratorand a rank of the piece of experience data in a ranking of the pieces ofexperience data in the replay memory according to their expectedlearning progress measures as a denominator.

In some implementations, when a new experience tuple without a priormeasure of temporal difference learning error is added to the replaymemory, the system assigns a measure of maximum priority to the tuple,i.e., assigns the experience tuple a priority that is the maximumpossible priority that can be determined for any experience tupleaccording to how the system determines the priorities. This increasesthe likelihood that the system uses all experience tuples in training atleast once.

The system determines a probability for each piece of experience data(304). The system sets probabilities for pieces of experience data suchthat pieces of experience data having higher expected learning progressmeasures have higher probabilities than pieces of experience data havingrelatively lower expected learning progress measures. In particular, thesystem determines the probability for each piece of experience databased on the priority for the piece of experience data.

In some implementations, the probability P(i) for a piece of experiencedata i satisfies:

${P(i)} = \frac{p_{i}^{\alpha}}{\sum\limits_{k}\; p_{k}^{\alpha}}$

where α is a predetermined constant, k ranges across the pieces ofexperience data in the replay memory, and p_(i) is the priority for thepiece of experience data i.

In some implementations, the constant α is a measure of how muchprioritization of pieces of experience data should be used in samplingpieces of experience data. As such, when α=0, no prioritization isimplemented. As a increases, the priority p_(i) for the piece ofexperience data i becomes a more important factor in determining theprobability P(i) for the piece of experience data.

The system samples a piece of experience data from the replay memory(306). The system performs the sampling in accordance with thedetermined probabilities of pieces of experience data. In someimplementations, the system samples one or more pieces of experiencewith the highest determined probabilities. In some otherimplementations, the system samples each piece of experience data with aprobability equal to the determined probability for the piece ofexperience data.

FIG. 4 is a flow chart for an example process 400 for training a neuralnetwork on an experience tuple. For convenience, the process 400 will bedescribed as being performed by a system of one or more computerslocated in one or more locations. For example, a reinforcing learningsystem, e.g., the reinforcing learning system 100 of FIG. 1,appropriately programmed in accordance with this specification, canperform the process 400.

The system determines a temporal difference learning error for anexperience tuple (402). The temporal difference error associated with acurrent experience tuple can be the difference between: (i) a currentexpected return as determined by the neural network if the currentaction in the tuple is performed in response to the current observationin the tuple; and (ii) the sum of: (a) a time-discounted next expectedreturn if a next action is performed in response to the next observationin the tuple and (b) the reward in the tuple.

The manner in which the system selects the next action and determinesthe next expected return is dependent on the reinforcement learningalgorithm being used to train the neural network. For example, in a deepQ learning technique, the system selects as the next action the actionthat, when provided as input to a target neural network in combinationwith the next observation, results in the target neural networkoutputting the highest Q value and uses the Q value for the next actionthat is generated by the target neural network as the next return. Asanother example, in a double deep Q learning technique, the systemselects as the next action the action that, when provided as input tothe neural network in combination with the next observation, results inthe target neural network outputting the highest Q value and uses the Qvalue generated by providing the next action and the next observation asinput to the target neural network as the next return. As yet anotherexample, in a Sarsa learning technique, the next action is the actionthat was actually performed by the agent in response to the nextobservation, and the next return is the Q value generated by providingthe next action and the next observation as input to the target neuralnetwork. The target neural network is a neural network that has the samearchitecture as the action selection neural network, but that may havedifferent parameters.

The system determines a weight for the temporal difference learningerror (404). In some implementations, the weight w_(i) for the temporaldifference learning error for the experience tuple i satisfies:

$w_{i} = \left( {\frac{1}{N} \cdot \frac{1}{P(i)}} \right)^{\beta}$

where N is the number of experience tuples in the replay memory, P(i) isthe probability for experience tuple i, and β is a bias factor.

In some implementations, the bias factor is a predetermined constantvalue. In some other implementations, the system anneals an exponentused in computing the weight (e.g., the bias factor β) during thetraining of neural network. In some implementations, the system linearlyanneals the exponent from its predetermined initial value to 1 duringthe training of the neural network.

The system adjusts the temporal difference learning error using theweight (406). In some implementations, the system adjusts the temporaldifference learning error by multiplying the error by the weight.

The system uses the adjusted temporal difference learning error inadjusting the parameter values of the neural network (408). In someimplementations, the system uses the adjusted temporal differencelearning error as a target error for adjusting the values of theparameters of the neural network as part of a conventional reinforcementlearning technique, e.g., Sarsa, deep Q-learning, or double deepQ-learning.

In some implementations, the system uses the temporal differencelearning error only in selecting experience data from the replay memoryand not to weight the temporal difference learning error duringtraining. That is, in some implementations, rather than use the adjustedtemporal difference learning error as described above with FIG. 4, thesystem instead uses the temporal difference learning error directly toadjust the parameter values.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in tangibly-embodied computer software or firmware, incomputer hardware, including the structures disclosed in thisspecification and their structural equivalents, or in combinations ofone or more of them. Embodiments of the subject matter described in thisspecification can be implemented as one or more computer programs, i.e.,one or more modules of computer program instructions encoded on atangible non transitory program carrier for execution by, or to controlthe operation of, data processing apparatus. Alternatively or inaddition, the program instructions can be encoded on an artificiallygenerated propagated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus forexecution by a data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them. The computer storage medium is not, however, apropagated signal.

The term “data processing apparatus” encompasses all kinds of apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC (application specificintegrated circuit). The apparatus can also include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them.

A computer program (which may also be referred to or described as aprogram, software, a software application, a module, a software module,a script, or code) can be written in any form of programming language,including compiled or interpreted languages, or declarative orprocedural languages, and it can be deployed in any form, including as astand alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment. A computer program may, butneed not, correspond to a file in a file system. A program can be storedin a portion of a file that holds other programs or data, e.g., one ormore scripts stored in a markup language document, in a single filededicated to the program in question, or in multiple coordinated files,e.g., files that store one or more modules, sub programs, or portions ofcode. A computer program can be deployed to be executed on one computeror on multiple computers that are located at one site or distributedacross multiple sites and interconnected by a communication network.

As used in this specification, an “engine,” or “software engine,” refersto a software implemented input/output system that provides an outputthat is different from the input. An engine can be an encoded block offunctionality, such as a library, a platform, a software development kit(“SDK”), or an object. Each engine can be implemented on any appropriatetype of computing device, e.g., servers, mobile phones, tabletcomputers, notebook computers, music players, e-book readers, laptop ordesktop computers, PDAs, smart phones, or other stationary or portabledevices, that includes one or more processors and computer readablemedia. Additionally, two or more of the engines may be implemented onthe same computing device, or on different computing devices.

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Computers suitable for the execution of a computer program include, byway of example, can be based on general or special purposemicroprocessors or both, or any other kind of central processing unit.Generally, a central processing unit will receive instructions and datafrom a read only memory or a random access memory or both. The essentialelements of a computer are a central processing unit for performing orexecuting instructions and one or more memory devices for storinginstructions and data. Generally, a computer will also include, or beoperatively coupled to receive data from or transfer data to, or both,one or more mass storage devices for storing data, e.g., magnetic,magneto optical disks, or optical disks. However, a computer need nothave such devices. Moreover, a computer can be embedded in anotherdevice, e.g., a mobile telephone, a personal digital assistant (PDA), amobile audio or video player, a game console, a Global PositioningSystem (GPS) receiver, or a portable storage device, e.g., a universalserial bus (USB) flash drive, to name just a few.

Computer readable media suitable for storing computer programinstructions and data include all forms of non-volatile memory, mediaand memory devices, including by way of example semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto optical disks; andCD ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's client device in response to requests received from the webbrowser.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back end, middleware, or front end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or of what may be claimed, but rather as descriptions offeatures that may be specific to particular embodiments of particularinventions. Certain features that are described in this specification inthe context of separate embodiments can also be implemented incombination in a single embodiment. Conversely, various features thatare described in the context of a single embodiment can also beimplemented in multiple embodiments separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various system modulesand components in the embodiments described above should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Particular embodiments of the subject matter have been described. Otherembodiments are within the scope of the following claims. For example,the actions recited in the claims can be performed in a different orderand still achieve desirable results. As one example, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In certain implementations, multitasking and parallelprocessing may be advantageous.

What is claimed is: 1-20. (canceled)
 21. A method for training a neuralnetwork used to select actions performed by a reinforcement learningagent interacting with an environment by performing actions that causethe environment to transition states, the method comprising: maintaininga replay memory, the replay memory storing a plurality of pieces ofexperience data that each represents information about an interaction ofthe agent with the environment, each piece of experience data having arespective expected learning progress measure, wherein for each of oneor more pieces of experience data, the respective expected learningprocess measure is derived from a result of a preceding time that thepiece of experience data was used in training the neural network and iscomputed based on an error measured at least with respect to a targetexpected return resulting from the interaction; selecting a piece ofexperience data from the replay memory by prioritizing for selectionpieces of experience data having relatively higher expected learningprogress measures; and training, using a reinforcement learningtechnique, the neural network on the selected piece of experience data.22. The method of claim 21, wherein: the target expected returnresulting from the interaction comprises a target expected total rewardthat could have been received by the agent following the interactioncharacterized by the selected piece of experience data; and training theneural network on the selected piece of experience data comprisesdetermining, with respect to the target expected total reward, anupdated error for the selected piece of experience data.
 23. The methodof claim 22, further comprising: determining an updated expectedlearning progress measure for the selected piece of experience databased on an absolute value of the updated error; and associating, in thereplay memory, the selected piece of experience data with the updatedexpected learning progress measure.
 24. The method of claim 21, whereinselecting the piece of experience data from the replay memory byprioritizing for selection pieces of experience data having relativelyhigher expected learning progress measures comprises: determining, basedon the respective expected learning progress measures for the pieces ofexperience data, a respective probability for each of the pieces ofexperience data in the replay memory; and sampling a piece of experiencedata from the replay memory in accordance with the determinedprobabilities.
 25. The method of claim 24, wherein determining, based onthe respective expected learning progress measures for the pieces ofexperience data, a respective probability for each of the pieces ofexperience data in the replay memory comprises: determining a respectiveprobability for each piece of experience data such that pieces ofexperience data having higher expected learning progress measures havehigher probabilities than pieces of experience data having relativelylower expected learning progress measures.
 26. The method of claim 25,wherein the probability P(i) for a piece of experience data i satisfies:${P(i)} = \frac{p_{i}^{\alpha}}{\sum\limits_{k}\; p_{k}^{\alpha}}$where α is a predetermined constant, k ranges across the pieces ofexperience data in the replay memory, and pi is a priority for the pieceof experience data i derived from the expected learning progress measurefor the piece of experience data i.
 27. The method of claim 26, whereinthe priority is the expected learning measure plus a constant value. 28.The method of claim 26 wherein the priority is a fraction having apredetermined positive value as a numerator and a rank of the piece ofexperience data i in a ranking of the pieces of experience data in thereplay memory according to their expected learning progress measures asa denominator.
 29. The method of claim 26, wherein the priority is setto a maximum value for a piece of experience data that has not yet beenused in training.
 30. The method of claim 21, wherein each piece ofexperience data is an experience tuple that comprises a respectivecurrent observation characterizing a respective current state of theenvironment, a respective current action performed by the agent inresponse to the current observation, a respective next statecharacterizing a respective next state of the environment, and a rewardreceived in response to the agent performing the current action.
 31. Themethod of claim 22, wherein training the neural network on the selectedpiece of experience data further comprises: using the updated error inadjusting values of the parameters of the neural network.
 32. The methodof claim 31, wherein using the updated error in adjusting the values ofthe parameters comprises: determining a weight for the updated errorusing the expected learning progress measure for the selected experiencetuple; adjusting the updated error using the weight; and using theadjusted error as a target error for adjusting the values of theparameters of the neural network.
 33. The method of claim 32, furthercomprising annealing an exponent used in computing the weight during thetraining of the neural network.
 34. The method of claim 30, wherein theexpected learning progress measure for each experience tuple in thereplay memory is a derivative of an absolute value of a temporaldifference learning error determined for the experience tuple thepreceding time the experience tuple was used in training the neuralnetwork.
 35. The method of claim 30, wherein the expected learningprogress measure for each experience tuple in the replay memory is anorm of an induced weight-change by using the experience tuple to trainthe neural network.
 36. A system comprising one or more computers andone or more storage devices storing instructions that are operable, whenexecuted by the one or more computers, to cause the one or morecomputers to perform operations for training a neural network used toselect actions performed by a reinforcement learning agent interactingwith an environment by performing actions that cause the environment totransition states, the operations comprising: maintaining a replaymemory, the replay memory storing a plurality of pieces of experiencedata that each represents information about an interaction of the agentwith the environment, each piece of experience data having a respectiveexpected learning progress measure, wherein for each of one or morepieces of experience data, the respective expected learning processmeasure is derived from a result of a preceding time that the piece ofexperience data was used in training the neural network and is computedbased on an error measured at least with respect to a target expectedreturn resulting from the interaction; selecting a piece of experiencedata from the replay memory by prioritizing for selection pieces ofexperience data having relatively higher expected learning progressmeasures; and training, using a reinforcement learning technique, theneural network on the selected piece of experience data.
 37. The systemof claim 36, wherein training the neural network on the selected pieceof experience data comprises: determining, with respect to a targetexpected total reward that could have been received by the agentfollowing the interaction characterized by the selected piece ofexperience data, an updated error for the selected piece of experiencedata.
 38. The system of claim 37, wherein the operations furthercomprise: determining an updated expected learning progress measure forthe selected piece of experience data based on an absolute value of theupdated error; and associating, in the replay memory, the selected pieceof experience data with the updated expected learning progress measure.39. The system of claim 36, wherein selecting the piece of experiencedata from the replay memory by prioritizing for selection pieces ofexperience data having relatively higher expected learning progressmeasures comprises: determining, based on the respective expectedlearning progress measures for the pieces of experience data, arespective probability for each of the pieces of experience data in thereplay memory; and sampling a piece of experience data from the replaymemory in accordance with the determined probabilities.
 40. The systemof claim 39, wherein determining, based on the respective expectedlearning progress measures for the pieces of experience data, arespective probability for each of the pieces of experience data in thereplay memory comprises: determining a respective probability for eachpiece of experience data such that pieces of experience data havinghigher expected learning progress measures have higher probabilitiesthan pieces of experience data having relatively lower expected learningprogress measures.
 41. A non-transitory computer storage medium encodedwith instructions that, when executed by one or more computers, causethe one or more computers to perform operations for training a neuralnetwork used to select actions performed by a reinforcement learningagent interacting with an environment by performing actions that causethe environment to transition states, the operations comprising:maintaining a replay memory, the replay memory storing a plurality ofpieces of experience data that each represents information about aninteraction of the agent with the environment, each piece of experiencedata having a respective expected learning progress measure, wherein foreach of one or more pieces of experience data, the respective expectedlearning process measure is derived from a result of a preceding timethat the piece of experience data was used in training the neuralnetwork and is computed based on an error measured at least with respectto a target expected return resulting from the interaction; selecting apiece of experience data from the replay memory by prioritizing forselection pieces of experience data having relatively higher expectedlearning progress measures; and training, using a reinforcement learningtechnique, the neural network on the selected piece of experience data.